package 作业;
import java.util.Scanner;
public class 绝对值 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double x = sc.nextDouble();
        System.out.println("输入值：");
        System.out.println(x);
        System.out.println("x的绝对值为：");
        if (x < 0){
             x = -x;
        }
        System.out.println(x);

    }
}
